Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
How to get "Event" object's specific element by javascript/typescript

Summary

I implemented select box in Vue.js/Nuxt.js application by Vuetify.js.
I added @change event to get selected value.

<v-select
  v-model="selectedStartTime"
  :items="startTime"
  item-text="text"
  item-value="value"
  @change="onChangeEndTime"
/>
onChangeEndTime (e : Event) {
  console.log(e)
}

Developer Console shows object value which is selected.
I want to know how to get its specific element value hour and minute in onChangeEndTime function.

```

what I tried

  1. console.log(e.target) returned undefined.

  2. console.log(e.hour) returns the exact value. but it shows error message Property 'hour' does not exist on type 'Event'.Vetur(2339) .

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

v-select's change-event argument is the selected value itself (not an Event object), which is the object containing hour and minute.

One solution is to change the type of e from Event to { hour: number, minute: number }:

onChangeEndTime (e : { hour: number, minute: number }) {
  console.log(e.hour) // ✅ e.hour exists
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!